﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Konekcija.Core.Reporting.Dto.Application.Content;

namespace Konekcija.Core.Reporting.Mappings.Content
{
    public class CommentMap : ClassMap<Comment>
    {
        public CommentMap()
        {
            Schema("content");
            Table("Comments");

            Id(x => x.Id).GeneratedBy.GuidComb().Not.Nullable();
            Map(x => x.ItemId).Column("ItemId")
                .Not.Insert().Not.Update().Nullable();
            Map(x => x.Active).Nullable();
            Map(x => x.Email).Nullable();
            Map(x => x.Ip).Nullable();
            Map(x => x.Body).Nullable();
            Map(x => x.DateCreated).Nullable();
            Map(x => x.DateChanged).Nullable();
            Map(x => x.ByUserId).Nullable();

            References(x => x.Item).Nullable();
        }
    }
}
